<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EasyQtSql: InsertQuery Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EasyQtSql
   </div>
   <div id="projectbrief">Easy SQL data access helper for QtSql</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_insert_query.htm','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_insert_query-members.htm">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">InsertQuery Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>QSqlQuery wrapper for <em>INSERT INTO table</em> query execution.  
 <a href="class_insert_query.htm#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_easy_qt_sql___insert_query_8h_source.htm">EasyQtSql_InsertQuery.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a645b3a953d9b9ee1e4bd497fcd95613e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_insert_query.htm#a645b3a953d9b9ee1e4bd497fcd95613e">InsertQuery</a> (const QString &amp;table, const QSqlDatabase &amp;db)</td></tr>
<tr class="separator:a645b3a953d9b9ee1e4bd497fcd95613e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae207fa97fdf9571fbcded31bbad9b9ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_insert_query.htm">InsertQuery</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_insert_query.htm#ae207fa97fdf9571fbcded31bbad9b9ed">values</a> (const QVariant &amp;t)</td></tr>
<tr class="memdesc:ae207fa97fdf9571fbcded31bbad9b9ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds list of insert-values to INSERT INTO table(...) VALUES ... query.  <a href="#ae207fa97fdf9571fbcded31bbad9b9ed">More...</a><br /></td></tr>
<tr class="separator:ae207fa97fdf9571fbcded31bbad9b9ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0700cb9fa232ef2a6b14101bb135824"><td class="memTemplParams" colspan="2">template&lt;typename... Rest&gt; </td></tr>
<tr class="memitem:aa0700cb9fa232ef2a6b14101bb135824"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="class_insert_query.htm">InsertQuery</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_insert_query.htm#aa0700cb9fa232ef2a6b14101bb135824">values</a> (const QVariant &amp;first, const Rest &amp;... rest)</td></tr>
<tr class="separator:aa0700cb9fa232ef2a6b14101bb135824"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a385c674dfad02ee62cfc0d3e124cd33b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_non_query_result.htm">NonQueryResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_insert_query.htm#a385c674dfad02ee62cfc0d3e124cd33b">exec</a> ()</td></tr>
<tr class="memdesc:a385c674dfad02ee62cfc0d3e124cd33b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes prepared <a class="el" href="class_insert_query.htm" title="QSqlQuery wrapper for INSERT INTO table query execution. ">InsertQuery</a> with insert values list.  <a href="#a385c674dfad02ee62cfc0d3e124cd33b">More...</a><br /></td></tr>
<tr class="separator:a385c674dfad02ee62cfc0d3e124cd33b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>QSqlQuery wrapper for <em>INSERT INTO table</em> query execution. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a645b3a953d9b9ee1e4bd497fcd95613e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a645b3a953d9b9ee1e4bd497fcd95613e">&#9670;&nbsp;</a></span>InsertQuery()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">InsertQuery::InsertQuery </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QSqlDatabase &amp;&#160;</td>
          <td class="paramname"><em>db</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a385c674dfad02ee62cfc0d3e124cd33b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a385c674dfad02ee62cfc0d3e124cd33b">&#9670;&nbsp;</a></span>exec()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_non_query_result.htm">NonQueryResult</a> InsertQuery::exec </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Executes prepared <a class="el" href="class_insert_query.htm" title="QSqlQuery wrapper for INSERT INTO table query execution. ">InsertQuery</a> with insert values list. </p>

</div>
</div>
<a id="ae207fa97fdf9571fbcded31bbad9b9ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae207fa97fdf9571fbcded31bbad9b9ed">&#9670;&nbsp;</a></span>values() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_insert_query.htm">InsertQuery</a>&amp; InsertQuery::values </td>
          <td>(</td>
          <td class="paramtype">const QVariant &amp;&#160;</td>
          <td class="paramname"><em>t</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Adds list of insert-values to INSERT INTO table(...) VALUES ... query. </p>
<p>The method supports variable count of QVariant parameters. Parameters are bound with <em>QSqlQuery::addBindValue</em>. </p><div class="fragment"><div class="line"><a class="code" href="class_non_query_result.htm">NonQueryResult</a> res = t.insertInto(<span class="stringliteral">&quot;table (a, b, c, d)&quot;</span>)</div><div class="line">      .values(1, 2, 3, <span class="stringliteral">&quot;a&quot;</span>)</div><div class="line">      .values(4, 5, 6, <span class="stringliteral">&quot;b&quot;</span>)</div><div class="line">      .values(7, 8, 9, <span class="stringliteral">&quot;c&quot;</span>)</div><div class="line">      .exec();</div></div><!-- fragment --> 
</div>
</div>
<a id="aa0700cb9fa232ef2a6b14101bb135824"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0700cb9fa232ef2a6b14101bb135824">&#9670;&nbsp;</a></span>values() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename... Rest&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_insert_query.htm">InsertQuery</a>&amp; InsertQuery::values </td>
          <td>(</td>
          <td class="paramtype">const QVariant &amp;&#160;</td>
          <td class="paramname"><em>first</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Rest &amp;...&#160;</td>
          <td class="paramname"><em>rest</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>EasyQtSql/<a class="el" href="_easy_qt_sql___insert_query_8h_source.htm">EasyQtSql_InsertQuery.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_insert_query.htm">InsertQuery</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
